/**
 * Copyright 2010 Victor Egea Hernando
 *
 * RockScript is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as published by
 * the Free Software Foundation, version 3 of the License.
 *
 * RockScript is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with RockScript.  If not, see <http://www.gnu.org/licenses/>.
 */
#ifndef PJIT_H_
#define PJIT_H_

#include "./../../types.h"

// picojit enabled by default
#define PICOJIT_ENABLED 1

#if PICOJIT_ENABLED == 1
	#ifdef  __i386__ || __i386
		#define PICOJIT_TARGET 1
	#elif __amd64__ || _M_X64
		#define PICOJIT_TARGET 2
		#error "The JIT doesn't support x86 / 64 CPU's at this moment"
	#elif __arm__
		#define PICOJIT_TARGET 3
		#error "The JIT doesn't support ARM CPU's at this moment"
	#else
		#error "There's no JIT available for the current CPU architecture"
	#endif
#endif

namespace pjit{

// types
typedef unsigned char      uint8;
typedef unsigned short     uint16;
typedef          int       int32;
typedef unsigned int       uint32;
typedef unsigned long long uint64;
typedef          float     real32;

}; // namespace pjit

#endif // PJIT_H_
